package com.kuaiyan.sdkshell.ad;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.kuaiyan.sdkshell.R;
import com.kuaiyan.sdkshell.base.BaseFragment;
import com.wmcsk.KuaiyanSdk;
import com.wmcsk.defaultImp.DefaultGuangaoAdapter;

/**
 * Created by admin on 2016/9/12.
 */
public class GuanggaoFragmentOne extends BaseFragment {

    private LinearLayout llXuanfu;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.activity_xuanfu, container, false);
        llXuanfu = (LinearLayout) view.findViewById(R.id.ll_xuanfu);
        String appId = "318";
        KuaiyanSdk.getInstance().requestAd("Index3Activity_One", llXuanfu, appId, new DefaultGuangaoAdapter() {
            @Override
            public void onSuccess(Object type) {
                // TODO Auto-generated method stub
                Log.e("MainActivity_ll_xuanfu", "success");
            }

            @Override
            public void onNetWorkError() {
                super.onNetWorkError();
            }

            @Override
            public void threadError(int code, String message, Exception e) {
                // TODO Auto-generated method stub
                Log.e("MainActivity_ll_xuanfu", code + "   " + message);
            }
        });
        return view;
    }


    @Override
    public void onDestroy() {
        super.onDestroy();
    }
}
